<?php
class MUserName extends TTemplateControl{
	public function getLabel() {
        $this->ensureChildControls();
        return $this->getRegisteredObject('Label');
    }
	public function getTextBox() {
        $this->ensureChildControls();
        return $this->getRegisteredObject('TextBox(');
    }
	public function checkUsername($sender, $param){		
		$param->IsValid = $this->TextBox->Text == "jalal";
	}
}
?>